import ScrollBoard from '../packages/ScrollBoard/index'
import ScreenAutoAdapter from '../packages/ScreenAutoAdapter/index'
import {version} from '../package.json'

const components = [ScrollBoard, ScreenAutoAdapter]
const install = function (Vue) {
  // 判断是否安装
  if (install.installed) {
    return
  }
  components.forEach((component) => {
    Vue.component(component.name, component)
  })
}

if (typeof window !== 'undefined' && window.Vue) {
  install(window.Vue)
}

export default {version, install, ScrollBoard, ScreenAutoAdapter}
